import redis

r = redis.Redis(host='localhost',port=6379)

r.set('test','123')

code = r.get('test')

# 拿下来的是字节码得转码

code  = code.decode('utf-8')
print(code)





